<?php
/**
 * 刷数据
 * User: 13651
 * Time: 2025/10/16 15:55
 */

namespace App\Api\V2\Controller\System;

use App\Api\Controllers\BaseController;
use App\Param\System\SystemDataSaveParam;
use App\Services\SystemDataSaveService;
use App\Traits\ResponseTrait;

class SystemDataSaveController extends BaseController
{
    use ResponseTrait;
    /**
     * 刷数据
     * @return mixed
     */
    public function dataSave()
    {
        $param = SystemDataSaveParam::create();
        $result = SystemDataSaveService::getInstance()->updateData($param);
        if ($result['status'] == 2) {
            return $this->errorResponse($result['message']);
        }
        return $this->successResponse($result['message']);
    }
}